﻿<UserControl x:Class="Common.Controls.CreateAccount"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:extended="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:liquid="clr-namespace:Liquid;assembly=Liquid"     
    xmlns:extensions="clr-namespace:SLExtensions.Controls;assembly=SLExtensions.Controls"
    xmlns:controls="clr-namespace:Common.Controls" 
    xmlns:tb="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls.WatermarkedTextBox"
    Width="300" Height="Auto">
    <Border Padding="5" CornerRadius="10">
        <Border.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint=".5,1">
                <GradientStop Color="LightGray" Offset="0"/>
                <GradientStop Color="Gray" Offset=".4"/>
                <GradientStop Color="Gray" Offset=".6"/>
                <GradientStop Color="LightGray" Offset="1"/>
            </LinearGradientBrush>
        </Border.Background>
        <Grid x:Name="LayoutRoot" VerticalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Vertical" Margin="0,8,0,8"  Grid.Row="0">               
                <controls:Logo Margin="0,8,0,0" HorizontalAlignment="Center" />                
            </StackPanel>
            <TextBlock VerticalAlignment="Center" Grid.Row="1" 
                       Margin="17,5,17,5" HorizontalAlignment="Left" 
                           Text="Enter a username ..."/>
            <tb:WatermarkedTextBox Margin="17,5,17,5" FontSize="16" 
                     TextChanged="tbUserName_TextChanged"
                     x:Name="tbUserName" IsTabStop="True" 
                     TabIndex="1" Grid.Row="2" Watermark="Enter a username..." />   
            <TextBlock Margin="17,5,17,10" Text="Enter a password below twice ..." Grid.Row="3"/>
            <PasswordBox Margin="17,0,17,5" HorizontalAlignment="Stretch"
                                IsTabStop="True" KeyUp="tbPassword_KeyUp"  
                                TabIndex="2" Grid.Row="4" x:Name="tbPassword" />                        
            <PasswordBox Margin="17,0,17,5" HorizontalAlignment="Stretch"
                                IsTabStop="True" KeyUp="tbPassword2_KeyUp"
                                TabIndex="2" Grid.Row="5" x:Name="tbPassword2" />            
            <StackPanel Margin="17,10,17,5" Grid.Row="6" Orientation="Horizontal">
                <Button x:Name="btnCreateAccount" TabIndex="3" IsTabStop="True" IsEnabled="False" 
                        Click="btnCreateAccount_Click" Content="Create Account"/>
                <Button x:Name="btnCancel" Margin="10,0,0,0" TabIndex="3" IsTabStop="True" 
                        Click="btnCancel_Click" Content="Cancel"/>
                <TextBlock x:Name="lblStatus" FontWeight="Bold"
                       FontSize="12" TextWrapping="Wrap" Margin="10,0,0,0"/>
            </StackPanel>
            <TextBlock Grid.Row="7" x:Name="Error" HorizontalAlignment="Stretch" 
                       Height="Auto" FontWeight="Bold" FontSize="12" 
                       TextWrapping="Wrap" Margin="5,0,0,0" Foreground="Red"/>                            
        </Grid>
    </Border>
</UserControl>
